using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Linq;
using System.Runtime.CompilerServices;
using System.Text;

namespace ns20
{
	internal static class Class199
	{
		[CompilerGenerated]
		private sealed class Class200<T>
		{
			public Func<T, string> func_0;

			public string string_0;

			public bool method_0(T gparam_0)
			{
				return string.Equals(func_0(gparam_0), string_0, StringComparison.OrdinalIgnoreCase);
			}

			public bool method_1(T gparam_0)
			{
				return string.Equals(func_0(gparam_0), string_0, StringComparison.Ordinal);
			}
		}

		public const string string_0 = "\r\n";

		public const string string_1 = "";

		public const char char_0 = '\r';

		public const char char_1 = '\n';

		public const char char_2 = '\t';

		public static string smethod_0(this string string_2, IFormatProvider iformatProvider_0, object object_0)
		{
			return string_2.smethod_3(iformatProvider_0, object_0);
		}

		public static string smethod_1(this string string_2, IFormatProvider iformatProvider_0, object object_0, object object_1)
		{
			return string_2.smethod_3(iformatProvider_0, object_0, object_1);
		}

		public static string smethod_2(this string string_2, IFormatProvider iformatProvider_0, object object_0, object object_1, object object_2)
		{
			return string_2.smethod_3(iformatProvider_0, object_0, object_1, object_2);
		}

		public static string smethod_3(this string string_2, IFormatProvider iformatProvider_0, params object[] object_0)
		{
			Class204.smethod_2(string_2, "format");
			return string.Format(iformatProvider_0, string_2, object_0);
		}

		public static bool smethod_4(string string_2)
		{
			if (string_2 == null)
			{
				throw new ArgumentNullException("s");
			}
			if (string_2.Length == 0)
			{
				return false;
			}
			int num = 0;
			while (true)
			{
				if (num < string_2.Length)
				{
					if (!char.IsWhiteSpace(string_2[num]))
					{
						break;
					}
					num++;
					continue;
				}
				return true;
			}
			return false;
		}

		public static string smethod_5(string string_2)
		{
			if (!string.IsNullOrEmpty(string_2))
			{
				return string_2;
			}
			return null;
		}

		public static StringWriter smethod_6(int int_0)
		{
			StringBuilder sb = new StringBuilder(int_0);
			return new StringWriter(sb, CultureInfo.InvariantCulture);
		}

		public static int? smethod_7(string string_2)
		{
			return string_2?.Length;
		}

		public static void smethod_8(char char_3, char[] char_4)
		{
			char_4[0] = '\\';
			char_4[1] = 'u';
			char_4[2] = Class193.smethod_1(((int)char_3 >> 12) & 0xF);
			char_4[3] = Class193.smethod_1(((int)char_3 >> 8) & 0xF);
			char_4[4] = Class193.smethod_1(((int)char_3 >> 4) & 0xF);
			char_4[5] = Class193.smethod_1(char_3 & 0xF);
		}

		public static T smethod_9<T>(this IEnumerable<T> ienumerable_0, Func<T, string> func_0, string string_2)
		{
			if (ienumerable_0 == null)
			{
				throw new ArgumentNullException("source");
			}
			if (func_0 == null)
			{
				throw new ArgumentNullException("valueSelector");
			}
			IEnumerable<T> source = ienumerable_0.Where((T gparam_0) => string.Equals(func_0(gparam_0), string_2, StringComparison.OrdinalIgnoreCase));
			if (source.Count() <= 1)
			{
				return source.SingleOrDefault();
			}
			IEnumerable<T> source2 = ienumerable_0.Where((T gparam_0) => string.Equals(func_0(gparam_0), string_2, StringComparison.Ordinal));
			return source2.SingleOrDefault();
		}

		public static string smethod_10(string string_2)
		{
			if (string.IsNullOrEmpty(string_2))
			{
				return string_2;
			}
			if (!char.IsUpper(string_2[0]))
			{
				return string_2;
			}
			StringBuilder stringBuilder = new StringBuilder();
			for (int i = 0; i < string_2.Length; i++)
			{
				bool flag = i + 1 < string_2.Length;
				if (i == 0 || !flag || char.IsUpper(string_2[i + 1]))
				{
					char value = char.ToLower(string_2[i], CultureInfo.InvariantCulture);
					stringBuilder.Append(value);
					continue;
				}
				stringBuilder.Append(string_2.Substring(i));
				break;
			}
			return stringBuilder.ToString();
		}

		public static bool smethod_11(char char_3)
		{
			return char.IsHighSurrogate(char_3);
		}

		public static bool smethod_12(char char_3)
		{
			return char.IsLowSurrogate(char_3);
		}
	}
}
